interface Response {
  code: number;
  msg: string;
  data: any;
}
export function responseSuccess(
  data: any = '操作成功',
  code: number = 0,
  msg: string = '操作成功'
): Response {
  return { code, msg, data };
}
export function responseError(
  msg: string = '操作成功',
  code: number = 200,
  data: any = '操作失败'
): Response {
  return { code, msg, data };
}

export function responseData({ msg, code, data }): Response {
  return { code, msg, data };
}
